<?php 
	header("Access-Control-Allow-Origin:*");
	$userphone = $_POST["userphone"];
	$password = $_POST["password"];
	$conn = mysqli_connect("localhost", "root", "root", "text2");
	$sql = "INSERT INTO incake (userphone, password) VALUES ('$userphone', '$password')";
	$result = mysqli_query($conn, $sql);
	if ($result){
		$arr = array("res_code"=>1, "res_message"=>"success");
		echo json_encode($arr);
	} else{
		$arr = array("res_code"=>-1, "res_message"=>"failed：" . mysqli_error($conn));
		echo json_encode($arr);
	}
	mysqli_close($conn);
?>